Dynamic keyboards are hardware keyboards that allow for customization of functionality. Conventionally, a dynamic keyboard includes a control area that can be configured programmatically to provide a number of controls for a host application. Each control has an icon or other visual representation that is displayed on the control area of the dynamic keyboard. When a user interacts with a control, a command is sent to the host application, which performs an action based on the command. An example of a control area on a dynamic keyboard is the Apple Touch Bar.
Among other things, dynamic keyboards allow for different sets of controls to be provided for different applications. As a user switches from one application to another, the control area on the dynamic keyboard can be updated to the controls for the current active application. While this provides for interactive controls on the hardware keyboard that are application-specific, application developers currently must hardcode the controls for dynamic keyboards into their applications. As a result, the controls included on a dynamic keyboard for an application are fixed based on what the application developer hardcoded into the application.